package com.com.athengzhi.myRule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Package: com.com.athengzhi.myRule
 * @ClassName: MySelfRule
 * @Author: lhz
 * @CreateTime: 2023/4/21 18:04
 * @Description:
 */
@Configuration
public class MySelfRule {
    @Bean
    public IRule myRule(){
        return new RandomRule();  //定位随机负载均衡
    }
}
